<?php

namespace common\datas;

class Enums
{
    const YES = 1;
    const NO = 2;

    /**
     * @return array [desc]
     */
    public static function getIsDatas()
    {
        return [
            self::YES => ['是'],
            self::NO => ['否'],
        ];
    }

    /**
     * @return array
     */
    public static function getIsDesc()
    {
        $descArr = [];
        foreach (static::getIsDatas() as $k => $v) {
            $descArr[$k] = $v[0];
        }
        return $descArr;
    }

    const ACTIVE = 200;
    const DISABLE = 99;

    /**
     * @return array [desc]
     */
    public static function getStatusDatas()
    {
        return [
            self::ACTIVE => ['正常'],
            self::DISABLE => ['禁用'],
        ];
    }

    /**
     * @return array
     */
    public static function getStatusDesc()
    {
        $descArr = [];
        foreach (static::getStatusDatas() as $k => $v) {
            $descArr[$k] = $v[0];
        }
        return $descArr;
    }
}
